package com.xdja.kafka.hdfs.client;


/**
 * @author Ruison
 * on 2019/7/5 - 13:54
 */

public class HadoopProperties {
    /** fs uri地址 */
    private String nameNode = "hdfs://192.168.35.203:8020/";
    /** 默认文件夹 */
    private String directoryPath = "/wjy";

    public HadoopProperties() {
        this.nameNode = "hdfs://192.168.35.203:8020/";
        this.directoryPath = "/wjy";
    }

    public String getDirectoryPath() {
        StringBuilder sb = new StringBuilder(directoryPath);
        if (!(directoryPath.indexOf("/") == directoryPath.length())) {
            sb.append("/");
        }
        return sb.toString();
    }

    public String getPath() {
        return this.nameNode + this.directoryPath;
    }

    public String getNameNode() {
        return this.nameNode;
    }

}
